package cuit.demo.service;

import cuit.demo.Entity.Article;
import cuit.demo.Entity.Comment;
import cuit.demo.Entity.User;

import java.io.File;
import java.util.List;

public interface MyService {
    User findUserById(int userId);
    List<Article> findArticlesByUserId(int userId);
    List<Comment> findCommentsByArticleId(int articleId);
    List<Article> findAllArticles();
    void saveUser(User newUser);
    Article findArticleById(int id);
    void saveArticle(Article newArticle);
    void deleteArticle(int articleId);
    void saveComment(Comment newComment);
    Article findArticleByTitle(String title);
    Comment findCommentById(int commentId);
    void deleteComment(int commentId);
    List<Article> findArticlesByArticleTitle(String title);
    boolean updateArticle(int articleId, String articleTitle, String articleText,String article_attachment,String attachment_name);
    void updateUser(User existingUser);;
    List<Article> findArticlesByTitleOrAuthor(String keyword);
    File getArticleAttachment(int articleId);
}